<?php
namespace app\admin\controller;
use think\captcha\Captcha;
use think\Request;

/**
 * Class Verify验证码
 * @package app\admin\controller
 */
class Verify
{

    public function getverify(Request $request)
    {
        $config =    [
            // 验证码字体大小
            'fontSize'    =>    $request->font_size?$request->font_size:18,
            // 验证码位数
            'length'      =>    $request->length?$request->length:3,
            // 关闭验证码杂点
            'useNoise'    =>    false,
            //验证码宽度
            'width'       =>   $request->width?$request->width:150,
            //验证码公高度
            'height'      =>   $request->height?$request->height:32,

        ];
        $captcha = new Captcha($config);
        return $captcha->entry();
    }
}